/**
 * 
 */
package com.ncr.travel.appmgr.model;

import com.ncr.travel.appmgr.model.shared.RuleControls;

/**
 * @author mm185255
 *
 */
public class RuleControlsJson implements RuleControls {

	private String ruleType;
	private Boolean hasAddButton;
	private Boolean hasDeleteButton;

	//ColumnMetaData columnMetaData;

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RuleControls#getRuleType()
	 */
	@Override
	public String getRuleType() {
		return ruleType;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RuleControls#setRuleType(java.lang.String)
	 */
	@Override
	public void setRuleType(String ruleType) {
		this.ruleType = ruleType;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RuleControls#getHasAddButton()
	 */
	@Override
	public Boolean getHasAddButton() {
		return hasAddButton;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RuleControls#setHasAddButton(java.lang.Boolean)
	 */
	@Override
	public void setHasAddButton(Boolean hasAddButton) {
		this.hasAddButton = hasAddButton;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RuleControls#getHasDeleteButton()
	 */
	@Override
	public Boolean getHasDeleteButton() {
		return hasDeleteButton;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.RuleControls#setHasDeleteButton(java.lang.Boolean)
	 */
	@Override
	public void setHasDeleteButton(Boolean hasDeleteButton) {
		this.hasDeleteButton = hasDeleteButton;
	}

	/*public ColumnMetaData getColumnMetaData() {
		return columnMetaData;
	}
	public void setColumnMetaData(ColumnMetaData columnMetaData) {
		this.columnMetaData = columnMetaData;
	}*/

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((hasAddButton == null) ? 0 : hasAddButton.hashCode());
		result = prime * result + ((hasDeleteButton == null) ? 0 : hasDeleteButton.hashCode());
		result = prime * result + ((ruleType == null) ? 0 : ruleType.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		RuleControlsJson other = (RuleControlsJson) obj;
		if (hasAddButton == null) {
			if (other.hasAddButton != null)
				return false;
		} else if (!hasAddButton.equals(other.hasAddButton))
			return false;
		if (hasDeleteButton == null) {
			if (other.hasDeleteButton != null)
				return false;
		} else if (!hasDeleteButton.equals(other.hasDeleteButton))
			return false;
		if (ruleType == null) {
			if (other.ruleType != null)
				return false;
		} else if (!ruleType.equals(other.ruleType))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "RuleControlsJson [ruleType=" + ruleType + ", hasAddButton=" + hasAddButton + ", hasDeleteButton=" + hasDeleteButton + "]";
	}
}
